package com.zz.controller;

import com.github.pagehelper.PageInfo;
import com.zz.domain.User;
import com.zz.services.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;
@Controller
public class AdminController {
    @Autowired
    UserService userService ;
    @RequestMapping("/admin")
    public String adminMain(Model model){
        PageInfo<User> userList = userService.getUserList();
        model.addAttribute("userList",userList);
        return  "admin_main";
    }
}
